/*
 * ImageRecorder.cpp
 *
 *  Created on: 12.06.2014
 *      Author: philipp
 */

#include "Screen.hpp"
#include "FileHelper.hpp"
#include "EigenfaceTrainingSet.hpp"
#include "Bell.hpp"
#include "ReleaseBuzzer.hpp"
#include "Led.hpp"
#include "Camera.hpp"
#include <iostream>

/*
 * Doorlock sub program. This is the program run when starting the executable by default.
 */
class DoorLock {
private:
	Led *greenLed, *redLed;
	Bell *mainBell, *secondaryBell;
	EigenfaceTrainingSet *efts;
	cv::Ptr<cv::FaceRecognizer> test;

	void hardwareSetup();
	void unlockDoor();
	void failure();
	void startAuthentification();
	void eventLoop();
public:
	/*
	 * enters an endless loop checking for external events within constructor and blocks.
	 */
	DoorLock();
	/*
	 * dtor
	 */
	~DoorLock();
};

